package com.project.erp.service.contract.trade.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.project.erp.common.utils.Page;
import com.project.erp.dao.contract.trade.TradeCusContractDtlDao;
import com.project.erp.model.contract.trade.TradeCusContractDtl;
import com.project.erp.service.contract.trade.TradeCusContractDtlService;

@Service
@Transactional
public class TradeCusContractDtlServiceImpl implements
		TradeCusContractDtlService {
	@Autowired
	private TradeCusContractDtlDao tradeCusContractDtlDao;
	
	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	@Override
	public TradeCusContractDtl getTradeCusContractDtlById(
			Long tradeCusContractDtlId) {
		return tradeCusContractDtlDao.get(tradeCusContractDtlId);
	}

	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	@Override
	public Page<TradeCusContractDtl> getTradeCusContractDtlPageBySearch(
			Page<TradeCusContractDtl> page,
			TradeCusContractDtl tradeCusContractDtl) {
		return tradeCusContractDtlDao.getTradeCusContractPageBySearch(page, tradeCusContractDtl);
	}
}
